<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
	<meta charset="utf-8">
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta content="width=device-width, minimum-scale=1,initial-scale=1, maximum-scale=1, user-scalable=1" id="viewport" name="viewport" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<link type="text/css" rel="stylesheet" href="../../template/css/com/com.css"/>
	<link type="text/css" rel="stylesheet" href="../../template/css/list/style.css"/>
	<link rel="stylesheet" href="../../resource/weuimin.css" />
    <link rel="stylesheet" href="../../resource/jinsuistyle.css" />
	<script src="../../template/js/jquery.js"></script>
    <script type="text/javascript" src="../../script/constants.js"></script>
	<script type="text/javascript" charset="UTF-8" src="../../script/naes.js"></script>
	<script src="../../script/api.js"></script>
    <style type="text/css">

    	body{
    	    background-color: #f1f1f1 !important;
    	}

    	.content li {
          padding-bottom: 10px;
          margin: 10px;
          border-bottom: 1px solid #D8D8D8;

      }
      .content{
      	overflow: auto; /* auto | scroll */
  		-webkit-overflow-scrolling: touch;
      }
      .item, .text {
          display: -webkit-box;
      }

      .img {
          width: 80px;
          height: 80px;
      }

      img {
          width: 100%;
          display: block;
      }
      .text {
          -webkit-box-flex: 1;
          -webkit-box-orient: vertical;
          margin: 0 5px;
      }

      .text-price {
          padding: 2px 0;
      }

      .new-price {
        line-height:22px;
          font-size: 20px;
          color: #ff7c70;
          font-family: Impact, Arail, sans-serif;
          font-weight: bold;
      }

      .text-price del, .icon-heart {
          margin-left: 15px;
      }

      .text-price del, .icon-people + span, .icon-heart + span {
          color: #8c8c8c;
          font-size: 10px;

      }
      .icon {
          background-size: 12px;
          background-position: center center;
          background-repeat: no-repeat no-repeat;
          display: inline-block;
          height: 12px;
          width: 12px;
      }

      .icon-people {
          background-image: url("../image/dock_icon_my_tuniu@2x.png");
      }

      .icon-heart {
          background-image: url("../image/heart@2x.png");
      }
      .content1 {
          -webkit-box-flex: 1;
      }

    .address {
      margin-left: 5px;
      line-height: 18px;
      /*设置超过DIV后隐藏*/
       overflow: hidden;
      text-overflow: ellipsis;
       white-space: nowrap;
    }

    .cities{
      width:100%;

      font-size: small;
      line-height:25px;
      margin-top: 10px;
      border-bottom: 1px solid #005DA9;
      color: #005DA9;
      padding-left: 10px;
    }
      .qxmc{
         width:17%;
         display:block;
         float:left;

         text-align:center;
         margin-left: 2%
      }
      .qxmc-max{
       width:33%;
         display:block;
         float:left;
         text-align:center;
      }

      .cities{
        width:100%;
        font-size: small;
        line-height:25px;
        margin-top: 10px;
        border-bottom: 1px solid #005DA9;
        color: #005DA9;
        padding-left: 10px;
      }
    .jsdb{
       position: absolute;
       bottom: 0;
    }
    .starLevel_checkbox{
      height:20px;
      width:5%;
      margin: 1%;
      float: left;
    }

    .saterLevel_txt{
        float: left;
        height:30px;
        width: 23%;
        line-height: 20px;
        /*text-align: center;*/
        margin-left: 2%;
        vertical-align: middle;
        font-size: 15px;
        color: #d1d1d1;
    }
    .sureButton{
      width: 73%;
      height: 45px;
      margin-left: 5%;
      margin-right: 5%;
      background-color: #F8562E;
      float: left;
      /*margin:3%;*/
      font-size: 20px;
      color:#ffffff;
      line-height: 45px;
      vertical-align: middle;
      text-align: center;
    }

        </style>
        <!-- <script language="javascript" src="http://count26.51yes.com/click.aspx?id=268836397&logo=12" charset="gb2312"></script> -->
        <script type="text/javascript">
            //为价格和星级设置全局变量\
            var starLevel = [];
              starLevel.push(0);
              starLevel.push(0);
              starLevel.push(0);
              starLevel.push(0);
              starLevel.push(0);
              starLevel.push(0);
            var theMinPrice = 0;
            var theMaxPrice = 1000;

            var starLevels = "";   //传递的星级参数

            var doubleSliderId;     //滑动条ID
            var sliderUpperValue = 1000;  //滑动条较大的值
            var sliderLowerValue = 0;  //滑动条较小的值
            var loadMore = 1;
            var cityCode = "";
            var disCode = "";
            var position = 0;
            var page = 1;

            var currentPositin= "";   //当前位置信息

         	window.apiready = function() {
             opennima();
            api.addEventListener({
                 name:'scrolltobottom',
                 extra:{
                     threshold:0            //设置距离底部多少距离时触发，默认值为0，数字类型
                 }
             }, function(ret, err){
                 if(loadMore == 2){
                   if(cityCode==0){
                     cityCode="";
                   }
                    getList(cityCode,disCode,0);
                    loadMore = 1;
                 }else{
                    api.toast({
                     msg: '再次上滑加载更多↑',
                     duration: 2000,
                     location: 'bottom'
                 });
                    loadMore++;
                 }
             });


            var startTime = document.getElementById('startTime');
            var endTime = document.getElementById('endTime');
            checkOutEnd = getNowFormatDate(getDate(),1);
            checkOutStart = getNowFormatDate(getDate(),0);
            $("#startTime").val(checkOutStart);
            $("#endTime").val(checkOutEnd);
            $api.attr(startTime, 'min', checkOutStart);
            $api.attr(endTime, 'min', checkOutEnd);

            var openArea = document.getElementById('openArea');
            var timeRecord = {
              startTime:'',
              endTime:'',
              changeTime:''
            }
            function touchstartFn(){
              timeRecord.startTime = new Date().getTime();
              openArea.style.color = "#660099";
            }

            function touchendFn(){
              timeRecord.endTime = new Date().getTime();
              timeRecord.changeTime = timeRecord.endTime - timeRecord.startTime;
              if(timeRecord.changeTime<300){
                opennima();
              }
              openArea.style.color = "#005DA9";
            }
            api.addEventListener({
                name: 'returnSearchDestination'
            }, function(ret, err) {
                // alert(JSON.stringify(ret.value));
                var name = ret.value.name;
                  $("#myDestination").html(name);
            });
          }

                function modifyStartTime(){
                    var st = $("#startTime").val();
                    var startTime = getNowFormatDate(st,0);
                    var endTime = getNowFormatDate(st,1);
                    $("#endTime").val(endTime);
                    var et = document.getElementById('endTime');
                    $api.attr(et, 'min', endTime);
               }

                function modifyEndTime(){
                   var startDate = $("#startTime").val();
                   var endDate = $("#endTime").val();
                   var ddate = getDays(startDate,endDate);
                   $("#rest_day").html("共"+ddate+"晚");
                 }

                 function getDays(date1 , date2){
                   var date1Str = date1.split("-");//将日期字符串分隔为数组,数组元素分别为年.月.日
                   //根据年 . 月 . 日的值创建Date对象
                   var date1Obj = new Date(date1Str[0],(date1Str[1]-1),date1Str[2]);
                   var date2Str = date2.split("-");
                   var date2Obj = new Date(date2Str[0],(date2Str[1]-1),date2Str[2]);
                   var t1 = date1Obj.getTime();
                   var t2 = date2Obj.getTime();
                   var dateTime = 1000*60*60*24; //每一天的毫秒数
                   var minusDays = Math.floor(((t2-t1)/dateTime));//计算出两个日期的天数差
                   var days = Math.abs(minusDays);//取绝对值
                   return days;
                }

                function getNowFormatDate(date,addDayCount) {
                   var now = new Date(date);
                   now.setDate(now.getDate()+addDayCount);
                   //格式化日，如果小于9，前面补0
                   var day = ("0" + now.getDate()).slice(-2);
                   var mday =  ("0" + now.getDate()).slice(-2);
                   var month = ("0" + (now.getMonth() + 1)).slice(-2);
                   //拼装完整日期格式
                   var newDate = now.getFullYear()+"-"+(month)+"-"+(day) ;
                   return newDate;
               }

               function getDate(){
                 var ddd = new Date();
                 var day =ddd.getDate();

                 if(ddd.getMonth()<10){
                 var month = "0"+(ddd.getMonth()+1);
                 }

                 if(ddd.getDate()<10){
                  day = "0"+ddd.getDate();
                 }

                 var datew = ddd.getFullYear()+"-"+month+"-"+day;
                 return datew;
               }

               function openORCloseMore() {
                 if($('#moreFiltrate').css('display')=='none'){
                   $('#moreFiltrate').show();
                   show_doubliSplier();
                   $("#packUpAndMore").html('收起▲');
                   cities.hidden = true;
                 }else if ($('#moreFiltrate').css('display')=='block') {

                   cancel_starLevelAndPrice();
                   $("#packUpAndMore").html('更多▼');
                 }
               }

               //确定筛选的价格和星级
               function sure_starLevelAndPrice() {
                    starLevels="";
                    obj = document.getElementsByName("starLevel");
                    for(k in obj){
                      // alert(starLevel[k]);
                      starLevel[k]=0;
                       if(obj[k].checked){
                         if(k==0){
                            starLevels += ("无,");
                         }else{
                              starLevels += (k+",");
                         }

                           starLevel[k]=1;
                       }
                    }
                    starLevels=starLevels.substring(0,starLevels.length-1);

                          // alert(theMinPrice);
                          // alert(theMaxPrice);

                    if(typeof(sliderLowerValue) != "undefined"){
                         theMinPrice=sliderLowerValue;
                    }

                    if(typeof(sliderUpperValue) != "undefined"){
                          theMaxPrice=sliderUpperValue;
                    }
                    // alert(theMinPrice);
                    // alert(theMaxPrice);

                    $('#moreFiltrate').hide();
                    setDoubleSliderValue();
                    page = 1;
                    // getList(cityCode,disCode,0);
                    getList(cityCode,disCode,0);
                   $("#packUpAndMore").html('更多▼');
               }

               //取消筛选的价格和星级
               function cancel_starLevelAndPrice() {
                  obj = document.getElementsByName("starLevel");
                 for(k in starLevel){
                   if(starLevel[k]==0){
                     obj[k].checked=false;
                   }else if (starLevel[k]==1) {
                       obj[k].checked=true;
                   }
                 }
                 $('#moreFiltrate').hide();
                 hide_doubliSplier();
                 setDoubleSliderValue();
                  //  cities.hidden = true;

               }

               //显示doubliSplier控件
               function show_doubliSplier(){
                var doubleSlider = api.require('doubleSlider');
                doubleSlider.open({
                    animation: true,
                    orientation: 'horizontal',
                    rect: {
                        x: 30,
                        y: 245,
                        size: 300
                    },
                    bubble: {
                        direction: 'top',
                        state: 'always',
                        w: 50,
                        // h: 25,
                        size: 14,
                        color: '#888',
                    },
                    handler: {
                        w: 40,
                        h: 25 ,
                        lowerBg: 'widget://image/search_zc/handler.png',
                        upperBg: 'widget://image/search_zc/handler.png'
                    },
                    bar: {
                        h: 10,
                        bg: 'widget://image/search_zc/bar_active.png',
                        active: 'widget://image/search_zc/bar_bg.png'
                    },
                    value: {
                        min: 0,
                        max: 1000,
                        step: 0.5,
                        lowerInit:sliderLowerValue,
                        upperInit:sliderUpperValue
                    },
                    fixedOn: api.frameName,
                    fixed: false
                  }, function(ret, err) {
                      if (ret) {

                          doubleSliderId=ret.id;
                          // if(ret.upperValue<500)
                          sliderUpperValue = ret.upperValue;
                            // if(ret.upperValue==500){
                            //   sliderUpperValue="无限";
                            // }
                          sliderLowerValue = ret.lowerValue;
                          // alert(doubleSliderId);
                          if (ret.upperValue==1000) {
                            var doubleSlider = api.require('doubleSlider');
                              doubleSlider.setBubble({
                                  id: doubleSliderId,
                                  content: '不限'
                              });
                          }
                          // alert(sliderUpperValue);
                      } else {
                          alert(JSON.stringify(err));
                      }
                });
               }

               //隐藏doubliSplier控件
               function hide_doubliSplier(){
                 var doubleSlider = api.require('doubleSlider');
                 doubleSlider.close({
                     id: doubleSliderId
                 });
               }

               function setDoubleSliderValue() {
                 var doubleSlider = api.require('doubleSlider');
                  doubleSlider.setValue({
                      id: doubleSliderId,
                      value: {
                            min: 0,
                            max: 1000,
                            step: 0.5,
                            lowerValue:theMinPrice,
                            upperValue:theMaxPrice
                      }
                  });
                  if (theMaxPrice==1000) {
                    // var doubleSlider = api.require('doubleSlider');
                      doubleSlider.setBubble({
                          id: doubleSliderId,
                          content: '不限'
                      });
                  }

               }

               //获取四川省酒店列表
              function opennima(){
                    // cancel_starLevelAndPrice();
                       var callback = function(ret, err){
                          var cities = document.getElementById('cities');
                          //隐藏或展开城市列表
                if(cities.hidden){
                  $("#packUpAndMore").html('更多▼');
                  cancel_starLevelAndPrice();
                  cities.hidden = false;
                }else{
                  cities.hidden = true;
                }
                          var data = eval('('+ret.list+')');
                          var html;

                            html = '<tr>'+
                      '<th>'+
                        '<td style="width:20%;" onclick=openThisCity(0,"全部")>全部</td>'+
                        '<td style="width:20%;" onclick=openThisCity("'+data[0].DM+'","'+data[0].MC+'")>'+data[0].MC+'</td>'+
                        '<td style="width:20%;" onclick=openThisCity("'+data[1].DM+'","'+data[1].MC+'")>'+data[1].MC+'</td>'+
                        '<td style="width:20%;" onclick=openThisCity("'+data[2].DM+'","'+data[2].MC+'")>'+data[2].MC+'</td>'+
                        '<td style="width:20%;" onclick=openThisCity("'+data[13].DM+'","'+data[13].MC+'")>'+data[13].MC+'</td>'+
                      '</th>'+
                    '</tr>'+
                    '<tr>'+
                      '<th>'+

                        '<td onclick=openThisCity("'+data[6].DM+'","'+data[6].MC+'")>'+data[6].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[7].DM+'","'+data[7].MC+'")>'+data[7].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[8].DM+'","'+data[8].MC+'")>'+data[8].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[9].DM+'","'+data[9].MC+'")>'+data[9].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[14].DM+'","'+data[14].MC+'")>'+data[14].MC+'</td>'+
                      '</th>'+
                    '</tr>'+
                    '<tr>'+
                      '<th>'+
                        '<td onclick=openThisCity("'+data[16].DM+'","'+data[16].MC+'")>'+data[16].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[17].DM+'","'+data[17].MC+'")>'+data[17].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[18].DM+'","'+data[18].MC+'")>'+data[18].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[19].DM+'","'+data[19].MC+'")>'+data[19].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[20].DM+'","'+data[20].MC+'")>'+data[20].MC+'</td>'+
                      '</th>'+
                    '</tr>'+
                    '<tr>'+
                      '<th>'+
                        '<td onclick=openThisCity("'+data[15].DM+'","'+data[15].MC+'")>'+data[15].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[5].DM+'","'+data[5].MC+'")>'+data[5].MC+'</td>'+
                        '<td onclick=openThisCity("'+data[3].DM+'","'+data[3].MC+'")>'+data[3].MC+'</td>'+
                        '<td  onclick=openThisCity("'+data[10].DM+'","'+data[10].MC+'")>'+data[10].MC+'</td>'+
                          '<td  onclick=openThisCity("'+data[4].DM+'","'+data[4].MC+'")>'+data[4].MC+'</td>'+
                      '</th>'+
                    '</tr>'+
                    '<tr>'+
                      '<th>'+
                        '<td  onclick=openThisCity("'+data[11].DM+'","'+data[11].MC+'")>'+data[11].MC+'</td>'+
                        '<td   colspan="3" onclick=openThisCity("'+data[12].DM+'","'+data[12].MC+'")>'+data[12].MC+'</td>'+
                      '</th>'+
                      // '</tr>'+
                      // '<tr>'+
                      //   '<th style="padding-left: 0px;">'+
                      //     '<td onclick="getMyLocation()"   colspan="5" ><div style="margin-left:-15px;margin-bottom:-2px;width:120%;height:35px;background-color:#fff;border-top: 1px solid #005DA9;line-height:35px;font-size:18px"><div style="float:left;width:16px;height:16px;margin-left:15px;margin-top:8px;background:url(\'../../image/search_zc/myLocation.png\');background-size:100%"></div><div style="float:left">&nbsp&nbsp我的位置</div></div></td>'+
                      //   '</th>'+
                    '</tr>';

                    // line-height:25px;
                    // margin-top: 10px;
                    // border-bottom: 1px solid #005DA9;
                    // color: #005DA9;
                    // padding-left: 10px;

                          $("#cities").html(html);
                        }
                        var parameter = {"dm": "510000"};
                     apiAjax(JSON.stringify(parameter),url.dzxx,callback);

              }

              /**
               *根据城市地址编码获取该市县级地区
               */
              function openThisCity(DM,MC){
                cityCode=DM;
                // disCode="";
                if(MC=="全部"){//这里设“全部”为四川省所有市级地区
                  $("#openArea").text('四川省');
                  page = 1;
                  cityCode = '';
                  disCode = '';
                  getList(cityCode,disCode,0);
                  var cities = document.getElementById('cities');
                  cities.hidden=true;
                  return false;

                }else{
                  $("#openArea").text(MC);

                    var callback = function(ret, err){
                      var data = ret.list;
                      var cities = document.getElementById('cities');
                      var html="";
                      //判断返回数据量的大小，选择合适的排列方式
                        if(data.length<=18){
                          html += '<span class="qxmc-max" onclick=openThis(0,"全部","'+cityCode+'","'+MC+'")>全部</span>';
                          for(var i=0;i<data.length;i++){
                              if((i+1)!=0&&(i+1)%3==0){//换行
                                html +=  '<br/><span class="qxmc-max" onclick=openThis("'+data[i].DM+'","'+data[i].MC+'","'+cityCode+'","'+MC+'")>'+data[i].MC+'</span>'
                              }else{
                                html += '<span class="qxmc-max" onclick=openThis("'+data[i].DM+'","'+data[i].MC+'","'+cityCode+'","'+MC+'")>'+data[i].MC+'</span>'
                              }
                          }
                          // html += '<br/><div onclick="getMyLocation()" style="margin-left:-15px;margin-bottom:-2px;width:120%;height:35px;background-color:#fff;border-top: 1px solid #005DA9;line-height:35px;font-size:18px"><div style="float:left;width:16px;height:16px;margin-left:15px;margin-top:8px;background:url(\'../../image/search_zc/myLocation.png\');background-size:100%"></div><div style="float:left">&nbsp&nbsp我的位置</div></div>'
                          $("#cities").html(html);
                        return false;
                        }
                        //判断返回数据量的大小，选择合适的排列方式
                      if(data.length>18){
                          html += '<span class="qxmc" onclick=openThis(0,"全部","'+cityCode+'","'+MC+'")>全部</span>';
                          for(var i=0;i<data.length;i++){
                            if((i+1)!=0&&(i+1)%5==0){
                              html +=  '<br/><span class="qxmc" onclick=openThis("'+data[i].DM+'","'+data[i].MC+'","'+cityCode+'","'+MC+'")>'+data[i].MC+'</span>'
                            }else{
                              html += '<span class="qxmc" onclick=openThis("'+data[i].DM+'","'+data[i].MC+'","'+cityCode+'","'+MC+'")>'+data[i].MC+'</span>'
                            }
                          }
                          // html += '<br/><div onclick="getMyLocation()" style="margin-left:-15px;margin-bottom:-2px;width:120%;height:35px;background-color:#fff;border-top: 1px solid #005DA9;line-height:35px;font-size:18px"><div style="float:left;width:16px;height:16px;margin-left:15px;margin-top:8px;background:url(\'../../image/search_zc/myLocation.png\');background-size:100%"></div><div style="float:left">&nbsp&nbsp我的位置</div></div>'

                        $("#cities").html(html);
                        return false;
                      }
                    }
                var parameter = {"areaCode":cityCode};
                apiAjax(JSON.stringify(parameter),url.queryAreaInCity,callback);
              }
            }

              /**
               *openThis 据地址编码获取某市县级地区
               *param disDM 县级地区编码
               *param MC 选中的地区名称、
              *param cityDM 市级地区编码
               *param cityMC 本来的市级地区名称
               */
              function openThis(disDM,MC,cityDM,cityMC){
                cityCode = cityDM;
                disCode = disDM;
                page = 1;
                if(MC=='全部'){//全市
                  $("#openArea").text(cityMC);
                  disCode = '';
                  // return false;
                }else{
                  $("#openArea").text(cityMC+MC);
                  }
                  getList(cityCode,disCode,0);
                  var cities = document.getElementById('cities');
                  cities.hidden = true;
              }

              /**
               *getList 获取酒店列表
               *param cityDM 市级地区编码
               *param disDM 县级地区编码
               *param position 位置
               */
              function getList(cityDM,disDM,position){
                      if(cityCode=="current"){
                         cityDM = "";
                         disDM = "";
                        //  cityCode="";
                        position=currentPositin;
                      }
                      if(page > 1 && count/10 < page-1){
                        alert(111);
                              api.toast({
                            msg: '没有更多数据',
                            duration: 2000,
                            location: 'bottom'
                        });
                          return;
                      }
                    $("#loadingToast").show();
                    var callback = function(ret, err){
                                console.log(JSON.stringify(ret));
                                count = ret.count;
                              var data = ret.list ;

                              var json = JSON.stringify(data);
                        var html="";

                                for(i in data){
                                if(data[i].address!= undefined || typeof(data[i].address) != "undefined"){
                                  //var pic = data[i].picUrl.split(",");

                                  html += '<li onclick=toDetail("'+data[i].id+'")>'+
                                    '<div class="item" id="delete">'+
                                        '<div class="img">';
                                        if(data[i].picUrl.length > 0){
                                        html += '<img src="'+data[i].picUrl[0].URL+'" style="height:100%;">';
                                        }else{
                                        html += '<img src="../../image/noimage.png" style="height:100%;">';
                                        }
                                    html += '</div>'+
                                        '<div class="text">'+
                                            '<div class="text-title" style="font-size:large;font-weight:bold;">'+data[i].name;
                            if(data[i].star!=null && data[i].star!=""){
                              html += '<span style="font-size:medium;color:#ff7c70;padding-left:8px;">'+data[i].star+'星</span>';
                            }
                            html +=  '</div><div class="text-price">';
                            if(data[i].minPrince==null){
                              html += '<span class="new-price">￥200</span>';
                            }else{
                              html += '<span class="new-price">￥'+data[i].minPrince+'</span>';
                            }

                                 html += '<span style="color:#ff7c70;line-height:0;">起</span>'+
                                            '</div>'+
                                            '<div class="address">地址：'+data[i].address+'</div>'+
                                        '</div>'+
                                    '</div>'+
                                '</li>';
                                }
                      }
                      if(page==1){
                          $('#hotelList').html(html);
                      }else if(page>1){
                          $('#hotelList').append(html);
                      }

                      $("#loadingToast").hide();
                      page++;
                    }
                    // alert(theMinPrice);
                    // alert(theMaxPrice);
                var parameter = {"page":page,"cityCode":cityDM,"disCode":disDM,"position":position,"starLevels":starLevels,"theMinPrice":theMinPrice+'',"theMaxPrice":theMaxPrice+''};
                      apiAjax(JSON.stringify(parameter),url.hotelList,callback);
              }


              function toDetail(id){
                  api.openWin({
                    name: 'hotel_homepage',
                    url: './hotel_homepage.html',
                    pageParam:{
                      id:id,
                      // startDate:$("#startTime").val(),
                      // endDate:$("#endTime").val()
                    }
                    });
              }

            //获取当前定位并设置
            function getMyLocation() {
                $("#loadingToast").show();
                // setTimeout(function(){ alert("Hello");}, 3000);
              var bMap = api.require('bMap');
              bMap.getLocation({
                  accuracy: '100m',
                  autoStop: true,
                  filter: 1
              }, function(ret, err) {
                  if (ret.status) {
                            var xStation = ret.lon;
                            var yStation = ret.lat;
                              bMap.getNameFromCoords({
                                  lon: xStation,
                                  lat: yStation
                              }, function(ret, err) {
                                  if (ret.status) {
                                      var data = ret.poiList;
                                      currentPositin = data[0].address;
                                      $("#openArea").html(currentPositin);
                                      cityCode="current";
                                      page= 1;
                                      getList(cityCode,disCode,0);
                                      var cities = document.getElementById('cities');
                                      if( !cities.hidden){
                                          cities.hidden=true;
                                      }
                                        $("#loadingToast").hide();
                                  }else {
                                      $("#openArea").html("四川省");
                                        cityCode="";
                                          $("#loadingToast").hide();
                                  }
                              });

                  } else {
                      alert(err.code);
                  }
              });
            }

            //打开我的地图
            function open_my_Bmap(){
                api.openWin({
                  name: 'my_Bmap',
                  url: './my_Bmap.html',

                });
            }

            //按区域查找
            function queryByArea() {
              $("#queryByAreaBut").css('background-color','#1296DB');
              $("#queryByAreaBut").css('color','#ffffff');
              $("#queryByMyLocationBut").css('background-color','#ffffff');
              $("#queryByMyLocationBut").css('color','#000000');
                opennima();
            }

            //按我的位置查找
            function queryByMyLocation() {
              $("#queryByMyLocationBut").css('background-color','#1296DB');
              $("#queryByMyLocationBut").css('color','#ffffff');
              $("#queryByAreaBut").css('background-color','#ffffff');
              $("#queryByAreaBut").css('color','#000000');
              getMyLocation();

              var cities = document.getElementById('cities');
              //隐藏或展开城市列表
              if(!cities.hidden){
                cities.hidden = true ;
              }

            }

 </script>
 </head>
    <body>

    <header id="statusBar">
        <div style="height:50px;background: #298cb4;display: table;width: 100%;">
           <div style="height:50px;line-height: 50px;color: #ffffff;background: #1e6887;">
               <div style="width: 26%;margin-left: 4%;font-size: 16px;float: left;" onclick="api.closeWin();">
	           返回
	           </div>
	           <div style="text-align: center;font-weight:bold;width: 40%;font-size: 16px;float: left;">
	           四川商旅
	           </div>
	           <!-- <div style="width: 26%;margin-right: 4%;font-size: 16px;float: left;text-align: right" onclick="chooseCollectOrOrder();">
	           收藏/订单
	           </div> -->
           </div>
        </div>
	</header>



  	<div class="com-content" style="padding-top: 0px; ">
          <div style="width:100%;height:60px;background-color:#FFFFFF">
              <div style="width:80%;height:60x;float:left">
                <div id="openArea" style="width:100%;height:40x;font-size:18px;line-height:40px;text-align:center;float:left;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">四川省 </div>
                <div style="width:100%;height:20x;font-size:12px;line-height:20px;text-align:center;float:left">（商旅住宿）</div>
                </div>
              <div style="width:20%;height:60px;float:left">
                  <div id="packUpAndMore" style="width:100%;height:30px;float:left;margin-top:20px;font-size:15px;text-align:center;line-height:30px" onclick="openORCloseMore()">更多▼</div>
                  <!-- <div style="width:240px;height:30px"></div> -->
              </div>
                <!-- <div style="width:40px;height:40px;background-color:red;float:right"></div>  收起▲▼  更多▼-->
          </div>
          <div style="width:100%;height:40px;background-color:#FFFFFF;">
            <div id="queryByAreaBut" onclick="queryByArea()" style="width:49.7%;height:38px;background-color:#1296DB;color:#ffffff;float:left;text-align:center;line-height:38px;font-size:18px;border-top:1px solid #aaaaaa;border-right:1px solid #aaaaaa;border-bottom:1px solid #aaaaaa">按区域查找</div>
            <div id="queryByMyLocationBut" onclick="queryByMyLocation()" style="width:50%;height:38px;float:left;text-align:center;line-height:38px;font-size:18px;border-top:1px solid #aaaaaa;border-bottom:1px solid #aaaaaa" >按我的位置查找</div>
          </div>

          <div id="moreFiltrate" style="height:240px;width:100%;background-color:#FFFFFF;display:none">

            <div style="height:20px;width:100%;">
                <div style="float:left;height:20px;width:50px;font-size:15px;line-height:20px;text-align:center;color:#FFFFFF">星级</div>
            </div>
                <div style="height:160px;width:100%;margin-left:10px">
                    <input id="starLevel0" class="starLevel_checkbox"  type="checkbox" name="starLevel" value="0" /> <div class="saterLevel_txt"> 无星级</div>
                    <input id="starLevel1" class="starLevel_checkbox"  type="checkbox" name="starLevel" value="1"/><div class="saterLevel_txt"> 一星级</div>
                    <input id="starLevel2" class="starLevel_checkbox" type="checkbox" name="starLevel" value="2" /> <div class="saterLevel_txt"> 二星级</div>
                    <input id="starLevel3" class="starLevel_checkbox"  type="checkbox" name="starLevel" value="3"/><div class="saterLevel_txt"> 三星级</div>
                    <input id="starLevel4" class="starLevel_checkbox" type="checkbox" name="starLevel" value="4" /> <div class="saterLevel_txt"> 四星级</div>
                    <input id="starLevel5" class="starLevel_checkbox"  type="checkbox" name="starLevel" value="5"/><div class="saterLevel_txt"> 五星级</div>
                    <div style="height:20px;width:100%;margin-left:-10px">
                        <div style="float:left;height:20px;width:50px;font-size:15px;line-height:20px;text-align:center;color:#FFFFFF">价格</div>
                    </div>
                </div>
                <div style="">
                    <div id="sure_starLevel" class="sureButton" onclick="sure_starLevelAndPrice();hide_doubliSplier()">确定</div>
                    <div style="height: 45px;width: 45px;background:url('../../image/search_zc/location1.jpg');float:left;background-size:100%" onclick="open_my_Bmap()"></div>
                    <!-- <div  style="float:left;width:50px;height:50px;margin-left:5px" onclick="getMyLocation()">
                      <div style="width:16px;height:16px;margin-left:17px;margin-top:5px;background:url('../../image/search_zc/myLocation.png');background-size:100%"></div>
                      <div style="width:50px;height:26px;line-height:26px;font-size:10px;text-align:center">我的位置</div>
                    </div> -->
              </div>
          </div>
          <table id="cities"  class="cities" hidden >
          </table>


    </div>


			<ul class="content" id="hotelList">


			</ul>

		</div>
	</div>
	<!-- 加载动画 -->
	<div id="loadingToast" style="display:none;">
			<div class="weui-mask_transparent"></div>
			<div class="weui-toast">
				<i class="weui-loading weui-icon_toast"></i>
				<p class="weui-toast__content">数据加载中...</p>
			</div>
		</div>
	<!-- 公共底部，必须引用 -->

<!--			<div class="com-footer-area footer" id="js-com-footer" style="width:100%;height: 8%;">
				<img src="../../image/db.png" style="width:100%;"/>
			</div>-->

</body>

</html>
